package com.yuju.roomStatus.enums;

/**
 * 房态打印的五种类型.
 */
public enum RoomStatusPrintEnum {
    EMPTY_CLEAN(1, "空净"),
    EMPTY_DIRTY(2, "空脏"),
    LIVE_CLEAN(3, "住净"),
    LIVE_DIRTY(4, "住脏"),
    RECORD(5, "维修");

    private int code;
    private String desc;

    RoomStatusPrintEnum(int code, String desc) {
        this.code = code;
        this.desc = desc;
    }

    public static String getDescByCode(int code) {
        for (RoomStatusPrintEnum enume : RoomStatusPrintEnum.values()) {
            if (enume.getCode() == code) {
                return enume.getDesc();
            }
        }

        return "未知枚举";
    }
    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public String getDesc() {
        return desc;
    }

    public void setDesc(String desc) {
        this.desc = desc;
    }
}
